<!-- 我的升级码 -->
<template>
  <div class="pag">
    <!-- 将已复制升级码标记为已售出  -->
    <cube-popup type="my-popup" v-show="showNotice" ref="upgradeMember" class="my-popup" maskClosable>
      <div class="active-ct">
        <div class="upgrade-member">
          <h2>已复制成功</h2>
          <h3 v-show="current == 0">是否移动至<span style="color:#DC0630;">已售出</span>？</h3>
          <h3 v-show="current == 1">是否移动至<span style="color:#DC0630;">未售出</span>？</h3>
          <!--<h3 v-show="current == 0">是否将已复制升级码<br/>移动至已售出？</h3>
          <h3 v-show="current == 1">是否将已复制升级码<br/>移动至未售出？</h3>-->
          <div class="submit-btn">
            <span @click="cancelMark">否</span>
            <span v-if="current == 0 && unsoldInfo == 0" @click="confirmMark(1)">是</span>
            <span v-if="current == 0 && unsoldInfo == 1" @click="confirmMark(2)">是</span>
            <span v-if="current == 0 && unsoldInfo == 2" @click="confirmMark(3)">是</span>
            <span v-if="current == 0 && unsoldInfo == 3" @click="confirmMark(4)">是</span>
            <span v-if="current == 1 && soldInfo == 0" @click="confirmMark(5)">是</span>
            <span v-if="current == 1 && soldInfo == 1" @click="confirmMark(6)">是</span>
            <span v-if="current == 1 && soldInfo == 2" @click="confirmMark(7)">是</span>
            <span v-if="current == 1 && soldInfo == 3" @click="confirmMark(8)">是</span>
          </div>
        </div>
      </div>
    </cube-popup>
    <div class="use-notice">
      <span class="line">&nbsp;</span><span class="warm-text"><span>*</span>成功生成的会员码需在360天内使用</span><span class="line">&nbsp;</span>
    </div>
    <div class="member-service">
      <div @click="changeTitle(0)" :class="{'selected':current == 0}">未售出({{unsoldNum}})</div>
      <div @click="changeTitle(1)" :class="{'selected':current == 1}">已售出({{soldNum}})</div>
    </div>
    <div class="use-info">
      <div class="use-info-title" v-show="current == 0">
        <div class="use-btn-group">
          <span @click="checkUnsoldInfo(0)" :class="{'selected':unsoldInfo == 0}">1个月({{unsoldDetail.oneMonthNum}})</span>
          <span @click="checkUnsoldInfo(1)" :class="{'selected':unsoldInfo == 1}">6个月({{unsoldDetail.sixMonthNum}})</span>
          <span @click="checkUnsoldInfo(2)" :class="{'selected':unsoldInfo == 2}">12个月({{unsoldDetail.oneYearNum}})</span>
          <span @click="checkUnsoldInfo(3)" :class="{'selected':unsoldInfo == 3}">已过期({{unsoldDetail.expiredNum}})</span>
        </div>
      </div>
      <div class="use-info-title" v-show="current == 1">
        <div class="use-btn-group">
          <span @click="checkSoldInfo(0)" :class="{'selected':soldInfo == 0}">1个月({{soldDetail.oneMonthNum}})</span>
          <span @click="checkSoldInfo(1)" :class="{'selected':soldInfo == 1}">6个月({{soldDetail.sixMonthNum}})</span>
          <span @click="checkSoldInfo(2)" :class="{'selected':soldInfo == 2}">12个月({{soldDetail.oneYearNum}})</span>
          <span @click="checkSoldInfo(3)" :class="{'selected':soldInfo == 3}">已过期({{soldDetail.expiredNum}})</span>
        </div>
      </div>
    </div>
    <div class="code-container">
      <div v-show="current == 0" style="height:100%;">
        <!-- 未售出升级码 一个月 -->
        <div class="code-content" v-show="unsoldInfo == 0">
          <h2 v-show="unsold.oneMonthList.length == 0">暂无明细</h2>
          <div class="scroll-list-wrap" v-show="unsold.oneMonthList.length > 0">
            <cube-scroll ref="scroll1" :data="unsold.oneMonthList" :options="options1" @pulling-up="onPullingUpOne">
              <div class="code-item" v-for="(item, index) in unsold.oneMonthList">
                <div class="avatar">
                  <img @click="toggleChoose(item.isChosen, index, unsold.oneMonthList, item.id, item.code)" src="~assets/images/dealer/yes.png" v-if="item.isChosen == 1" />
                  <img @click="toggleChoose(item.isChosen, index, unsold.oneMonthList, item.id, item.code)" src="~assets/images/dealer/no.png" v-if="item.isChosen == 0" />
                </div>
                <div class="detail">
                  <h3>
                    <span class="code">{{item.code}}</span>
                    <span :class="{'unused': item.status == 1, 'used': item.status == 2}">{{item.status == 1 ? '未使用' : item.status == 2 ? '已使用' : '已作废'}}</span>
                    <span>{{item.createTime}}</span>
                    <button class="clipboard-btn" :data-clipboard-text="item.code" @click="clipboardClick(1, item.id, item.code, index, unsold.oneMonthList, item.isChosen)">复制口令</button>
                  </h3>
                </div>
              </div>
            </cube-scroll>
          </div>
        </div>
        <!-- 未售出升级码 6个月 -->
        <div class="code-content" v-show="unsoldInfo == 1">
          <h2 v-show="unsold.sixMonthList.length == 0">暂无明细</h2>
          <div class="scroll-list-wrap" v-show="unsold.sixMonthList.length > 0">
            <cube-scroll ref="scroll2" :data="unsold.sixMonthList" :options="options2" @pulling-up="onPullingUpTwo">
              <div class="code-item" v-for="(item, index) in unsold.sixMonthList">
                <div class="avatar">
                  <img @click="toggleChoose(item.isChosen, index, unsold.sixMonthList, item.id, item.code)" src="~assets/images/dealer/yes.png" v-if="item.isChosen == 1" />
                  <img @click="toggleChoose(item.isChosen, index, unsold.sixMonthList, item.id, item.code)" src="~assets/images/dealer/no.png" v-if="item.isChosen == 0" />
                </div>
                <div class="detail">
                  <h3>
                    <span class="code">{{item.code}}</span>
                    <span :class="{'unused': item.status == 1, 'used': item.status == 2}">{{item.status == 1 ? '未使用' : item.status == 2 ? '已使用' : '已作废'}}</span>
                    <span>{{item.createTime}}</span>
                    <button class="clipboard-btn" :data-clipboard-text="item.code" @click="clipboardClick(2, item.id, item.code, index, unsold.sixMonthList, item.isChosen)">复制口令</button>
                  </h3>
                </div>
              </div>
            </cube-scroll>
          </div>
        </div>
        <!-- 未售出升级码 12个月 -->
        <div class="code-content" v-show="unsoldInfo == 2">
          <h2 v-show="unsold.twelveMonthList.length == 0">暂无明细</h2>
          <div class="scroll-list-wrap" v-show="unsold.twelveMonthList.length > 0">
            <cube-scroll ref="scroll3" :data="unsold.twelveMonthList" :options="options3" @pulling-up="onPullingUpThree">
              <div class="code-item" v-for="(item, index) in unsold.twelveMonthList">
                <div class="avatar">
                  <img @click="toggleChoose(item.isChosen, index, unsold.twelveMonthList, item.id, item.code)" src="~assets/images/dealer/yes.png" v-if="item.isChosen == 1" />
                  <img @click="toggleChoose(item.isChosen, index, unsold.twelveMonthList, item.id, item.code)" src="~assets/images/dealer/no.png" v-if="item.isChosen == 0" />
                </div>
                <div class="detail">
                  <h3>
                    <span class="code">{{item.code}}</span>
                    <span :class="{'unused': item.status == 1, 'used': item.status == 2}">{{item.status == 1 ? '未使用' : item.status == 2 ? '已使用' : '已作废'}}</span>
                    <span>{{item.createTime}}</span>
                    <button class="clipboard-btn" :data-clipboard-text="item.code" @click="clipboardClick(3, item.id, item.code, index, unsold.twelveMonthList, item.isChosen)">复制口令</button>
                  </h3>
                </div>
              </div>
            </cube-scroll>
          </div>
        </div>
        <!-- 未售出但已过期升级码  -->
        <div class="code-content" v-show="unsoldInfo == 3">
          <h2 v-show="unsold.expiredList.length == 0">暂无明细</h2>
          <div class="scroll-list-wrap" v-show="unsold.expiredList.length > 0">
            <cube-scroll ref="scroll4" :data="unsold.expiredList" :options="options4" @pulling-up="onPullingUpFour">
              <div class="code-item" v-for="(item, index) in unsold.expiredList">
                <div class="avatar">
                  <img @click="toggleChoose(item.isChosen, index, unsold.expiredList, item.id, item.code)" src="~assets/images/dealer/yes.png" v-if="item.isChosen == 1" />
                  <img @click="toggleChoose(item.isChosen, index, unsold.expiredList, item.id, item.code)" src="~assets/images/dealer/no.png" v-if="item.isChosen == 0" />
                </div>
                <div class="detail">
                  <h3>
                    <span class="code">{{item.code}}</span>
                    <span style="color:#202C5B;">{{item.status / 30}}个月</span>
                    <span>{{item.createTime}}</span>
                    <button class="clipboard-btn" :data-clipboard-text="item.code" @click="clipboardClick(4, item.id, item.code, index, unsold.expiredList, item.isChosen)">复制口令</button>
                  </h3>
                </div>
              </div>
            </cube-scroll>
          </div>
        </div>
      </div>
      <div v-show="current == 1" style="height:100%;">
        <!-- 已售出升级码 一个月 -->
        <div class="code-content" v-show="soldInfo == 0">
          <h2 v-show="sold.oneMonthList.length == 0">暂无明细</h2>
          <div class="scroll-list-wrap" v-show="sold.oneMonthList.length > 0">
            <cube-scroll ref="scroll5" :data="sold.oneMonthList" :options="options5" @pulling-up="onPullingUpFive">
              <div class="code-item" v-for="(item, index) in sold.oneMonthList">
                <div class="avatar">
                  <img @click="toggleChoose(item.isChosen, index, sold.oneMonthList, item.id, item.code)" src="~assets/images/dealer/yes.png" v-if="item.isChosen == 1" />
                  <img @click="toggleChoose(item.isChosen, index, sold.oneMonthList, item.id, item.code)" src="~assets/images/dealer/no.png" v-if="item.isChosen == 0" />
                </div>
                <div class="detail">
                  <h3>
                    <span class="code">{{item.code}}</span>
                    <span :class="{'unused': item.status == 1, 'used': item.status == 2}">{{item.status == 1 ? '未使用' : item.status == 2 ? '已使用' : '已作废'}}</span>
                    <span>{{item.createTime}}</span>
                    <button class="clipboard-btn" :data-clipboard-text="item.code" @click="clipboardClick(5, item.id, item.code, index, sold.oneMonthList, item.isChosen)">复制口令</button>
                  </h3>
                </div>
              </div>
            </cube-scroll>
          </div>
        </div>
        <!-- 已售出升级码 6个月 -->
        <div class="code-content" v-show="soldInfo == 1">
          <h2 v-show="sold.sixMonthList.length == 0">暂无明细</h2>
          <div class="scroll-list-wrap" v-show="sold.sixMonthList.length > 0">
            <cube-scroll ref="scroll6" :data="sold.sixMonthList" :options="options6" @pulling-up="onPullingUpSix">
              <div class="code-item" v-for="(item, index) in sold.sixMonthList">
                <div class="avatar">
                  <img @click="toggleChoose(item.isChosen, index, sold.sixMonthList, item.id, item.code)" src="~assets/images/dealer/yes.png" v-if="item.isChosen == 1" />
                  <img @click="toggleChoose(item.isChosen, index, sold.sixMonthList, item.id, item.code)" src="~assets/images/dealer/no.png" v-if="item.isChosen == 0" />
                </div>
                <div class="detail">
                  <h3>
                    <span class="code">{{item.code}}</span>
                    <span :class="{'unused': item.status == 1, 'used': item.status == 2}">{{item.status == 1 ? '未使用' : item.status == 2 ? '已使用' : '已作废'}}</span>
                    <span>{{item.createTime}}</span>
                    <button class="clipboard-btn" :data-clipboard-text="item.code" @click="clipboardClick(6, item.id, item.code, index, sold.sixMonthList, item.isChosen)">复制口令</button>
                  </h3>
                </div>
              </div>
            </cube-scroll>
          </div>
        </div>
        <!-- 已售出升级码 12个月 -->
        <div class="code-content" v-show="soldInfo == 2">
          <h2 v-show="sold.twelveMonthList.length == 0">暂无明细</h2>
          <div class="scroll-list-wrap" v-show="sold.twelveMonthList.length > 0">
            <cube-scroll ref="scroll7" :data="sold.twelveMonthList" :options="options7" @pulling-up="onPullingUpSeven">
              <div class="code-item" v-for="(item, index) in sold.twelveMonthList">
                <div class="avatar">
                  <img @click="toggleChoose(item.isChosen, index, sold.twelveMonthList, item.id, item.code)" src="~assets/images/dealer/yes.png" v-if="item.isChosen == 1" />
                  <img @click="toggleChoose(item.isChosen, index, sold.twelveMonthList, item.id, item.code)" src="~assets/images/dealer/no.png" v-if="item.isChosen == 0" />
                </div>
                <div class="detail">
                  <h3>
                    <span class="code">{{item.code}}</span>
                    <span :class="{'unused': item.status == 1, 'used': item.status == 2}">{{item.status == 1 ? '未使用' : item.status == 2 ? '已使用' : '已作废'}}</span>
                    <span>{{item.createTime}}</span>
                    <button class="clipboard-btn" :data-clipboard-text="item.code" @click="clipboardClick(7, item.id, item.code, index, sold.twelveMonthList, item.isChosen)">复制口令</button>
                  </h3>
                </div>
              </div>
            </cube-scroll>
          </div>
        </div>
        <!-- 已售出 但已过期升级码 -->
        <div class="code-content" v-show="soldInfo == 3">
          <h2 v-show="sold.expiredList.length == 0">暂无明细</h2>
          <div class="scroll-list-wrap" v-show="sold.expiredList.length > 0">
            <cube-scroll ref="scroll8" :data="sold.expiredList" :options="options8" @pulling-up="onPullingUpEight">
              <div class="code-item" v-for="(item, index) in sold.expiredList">
                <div class="avatar">
                  <img @click="toggleChoose(item.isChosen, index, sold.expiredList, item.id, item.code)" src="~assets/images/dealer/yes.png" v-if="item.isChosen == 1" />
                  <img @click="toggleChoose(item.isChosen, index, sold.expiredList, item.id, item.code)" src="~assets/images/dealer/no.png" v-if="item.isChosen == 0" />
                </div>
                <div class="detail">
                  <h3>
                    <span class="code">{{item.code}}</span>
                    <span style="color:#202C5B;">{{item.status / 30}}个月</span>
                    <span>{{item.createTime}}</span>
                    <button class="clipboard-btn" :data-clipboard-text="item.code" @click="clipboardClick(8, item.id, item.code, index, sold.expiredList, item.isChosen)">复制口令</button>
                  </h3>
                </div>
              </div>
            </cube-scroll>
          </div>
        </div>
      </div>
    </div>
    <!--////////////-->
    <!--////////////-->
    <!-- 未售出升级码 底部信息 -->
    <div @touchmove.prevent class="application-wrapper" v-show="current == 0">
        <!-- 未售出升级码 一个月 -->
        <div class="bottom-content" v-show="unsoldInfo == 0">
            <p @click="toggleSelectAll(unsold.oneMonthList)">
                <img src="~assets/images/dealer/yes.png" v-if="selectAll1" />
                <img src="~assets/images/dealer/no.png" v-else="" />全选
            </p>
            <div class="choose-info">
                <h3 v-show="unsoldInfo != 3">共{{unsoldDetail.oneMonthUnusedNum}}个未使用升级码</h3><!--unuse1-->
                <h4 v-show="choose1 > 0">已选中{{choose1}}个升级码</h4>
            </div>
            <h5 v-if="choose1 > 0" class="selected clipboard-btn" @click="copyAllNotice" :data-clipboard-text="allCodes1">批量复制</h5>
            <h5 v-else>批量复制</h5>
        </div>
        <!-- 未售出升级码 6个月 -->
        <div class="bottom-content" v-show="unsoldInfo == 1">
            <p @click="toggleSelectAll(unsold.sixMonthList)">
                <img src="~assets/images/dealer/yes.png" v-if="selectAll2" />
                <img src="~assets/images/dealer/no.png" v-else="" />全选
            </p>
            <div class="choose-info">
                <h3 v-show="unsoldInfo != 3">共{{unsoldDetail.sixMonthUnusedNum}}个未使用升级码</h3>
                <h4 v-show="choose2 > 0">已选中{{choose2}}个升级码</h4>
            </div>
            <h5 v-if="choose2 > 0" class="selected clipboard-btn" @click="copyAllNotice" :data-clipboard-text="allCodes2">批量复制</h5>
            <h5 v-else>批量复制</h5>
        </div>
        <!-- 未售出升级码 12个月 -->
        <div class="bottom-content" v-show="unsoldInfo == 2">
            <p @click="toggleSelectAll(unsold.twelveMonthList)">
                <img src="~assets/images/dealer/yes.png" v-if="selectAll3" />
                <img src="~assets/images/dealer/no.png" v-else="" />全选
            </p>
            <div class="choose-info">
                <h3 v-show="unsoldInfo != 3">共{{unsoldDetail.oneYearUnusedNum}}个未使用升级码</h3>
                <h4 v-show="choose3 > 0">已选中{{choose3}}个升级码</h4>
            </div>
            <h5 v-if="choose3 > 0" class="selected clipboard-btn" @click="copyAllNotice" :data-clipboard-text="allCodes3">批量复制</h5>
            <h5 v-else>批量复制</h5>
        </div>
        <!-- 未售出但已过期升级码 -->
        <div class="bottom-content" v-show="unsoldInfo == 3">
            <p @click="toggleSelectAll(unsold.expiredList)">
                <img src="~assets/images/dealer/yes.png" v-if="selectAll4" />
                <img src="~assets/images/dealer/no.png" v-else="" />全选
            </p>
            <div class="choose-info">
                <h3 v-show="unsoldInfo != 3">共{{unsoldDetail.expiredNum}}个未使用升级码</h3>
                <h4 v-show="choose4 > 0">已选中{{choose4}}个升级码</h4>
            </div>
            <h5 v-if="choose4 > 0" class="selected clipboard-btn" @click="copyAllNotice" :data-clipboard-text="allCodes4">批量复制</h5>
            <h5 v-else>批量复制</h5>
        </div>
    </div>
    <!--////////////-->
    <!--////////////-->
    <!-- 已售出升级码 底部信息 -->
    <div @touchmove.prevent class="application-wrapper" v-show="current == 1">
      <!-- 已售出升级码 一个月 -->
      <div class="bottom-content" v-show="soldInfo == 0">
          <p @click="toggleSelectAll(sold.oneMonthList)">
              <img src="~assets/images/dealer/yes.png" v-if="selectAll5" />
              <img src="~assets/images/dealer/no.png" v-else="" />全选
          </p>
          <div class="choose-info">
              <h3 v-show="soldInfo != 3">共{{soldDetail.oneMonthUnusedNum}}个未使用升级码</h3><!--unuse1-->
              <h4 v-show="choose5 > 0">已选中{{choose5}}个升级码</h4>
          </div>
          <h5 v-if="choose5 > 0" class="selected clipboard-btn" @click="copyAllNotice" :data-clipboard-text="allCodes5">批量复制</h5>
          <h5 v-else>批量复制</h5>
      </div>
      <!-- 已售出升级码 6个月 -->
      <div class="bottom-content" v-show="soldInfo == 1">
          <p @click="toggleSelectAll(sold.sixMonthList)">
              <img src="~assets/images/dealer/yes.png" v-if="selectAll6" />
              <img src="~assets/images/dealer/no.png" v-else="" />全选
          </p>
          <div class="choose-info">
              <h3 v-show="soldInfo != 3">共{{soldDetail.sixMonthUnusedNum}}个未使用升级码</h3><!--unuse1-->
              <h4 v-show="choose6 > 0">已选中{{choose6}}个升级码</h4>
          </div>
          <h5 v-if="choose6 > 0" class="selected clipboard-btn" @click="copyAllNotice" :data-clipboard-text="allCodes6">批量复制</h5>
          <h5 v-else>批量复制</h5>
      </div>
      <!-- 已售出升级码 12个月 -->
      <div class="bottom-content" v-show="soldInfo == 2">
          <p @click="toggleSelectAll(sold.twelveMonthList)">
              <img src="~assets/images/dealer/yes.png" v-if="selectAll7" />
              <img src="~assets/images/dealer/no.png" v-else="" />全选
          </p>
          <div class="choose-info">
              <h3 v-show="soldInfo != 3">共{{soldDetail.oneYearUnusedNum}}个未使用升级码</h3><!--unuse1-->
              <h4 v-show="choose7 > 0">已选中{{choose7}}个升级码</h4>
          </div>
          <h5 v-if="choose7 > 0" class="selected clipboard-btn" @click="copyAllNotice" :data-clipboard-text="allCodes7">批量复制</h5>
          <h5 v-else>批量复制</h5>
      </div>
      <!-- 已售出但已过期升级码 -->
      <div class="bottom-content" v-show="soldInfo == 3">
          <p @click="toggleSelectAll(sold.expiredList)">
            <img src="~assets/images/dealer/yes.png" v-if="selectAll8" />
            <img src="~assets/images/dealer/no.png" v-else="" />全选
          </p>
          <div class="choose-info">
            <h3 v-show="soldInfo != 3">共{{soldDetail.expiredNum}}个未使用升级码</h3><!--unuse1-->
            <h4 v-show="choose8 > 0">已选中{{choose8}}个升级码</h4>
          </div>
          <h5 v-if="choose8 > 0" class="selected clipboard-btn" @click="copyAllNotice" :data-clipboard-text="allCodes8">批量复制</h5>
          <h5 v-else>批量复制</h5>
      </div>
    </div>

    <div class="mask" v-show="showMask" @click="closeMask($event)">
      <div ref="maskContent">
        <div class="general-height pay-password" v-if="showPay">
          <h3 class="title">请输入支付密码验证身份</h3>
          <div class="password-wrapper">
            <span><strong v-if="password.num1 >= 0"></strong></span>
            <span><strong v-if="password.num2 >= 0"></strong></span>
            <span><strong v-if="password.num3 >= 0"></strong></span>
            <span><strong v-if="password.num4 >= 0"></strong></span>
            <span><strong v-if="password.num5 >= 0"></strong></span>
            <span><strong v-if="password.num6 >= 0"></strong></span>
          </div>
          <!--<div class="forget-password" @click="getPwd">忘记密码?</div>-->
          <div class="number-group">
            <div class="number-btn">
              <div @click.stop.prevent="chooseNum(1)">1</div><div @click.stop.prevent="chooseNum(2)">2</div><div @click.stop.prevent="chooseNum(3)">3</div>
            </div>
            <div class="number-btn">
              <div @click.stop.prevent="chooseNum(4)">4</div><div @click.stop.prevent="chooseNum(5)">5</div><div @click.stop.prevent="chooseNum(6)">6</div>
            </div>
            <div class="number-btn">
              <div @click.stop.prevent="chooseNum(7)">7</div><div @click.stop.prevent="chooseNum(8)">8</div><div @click.stop.prevent="chooseNum(9)">9</div>
            </div>
            <div class="number-btn">
              <div class="no-num"></div><div @click.stop.prevent="chooseNum(0)">0</div><div class="no-num" @click.stop.prevent="deletePwd"><img src="~assets/images/del.png" /></div>
            </div>
          </div>
          <div class="pay-loading" v-show="showPayLoading">
            <div class="paying">
              <img src="~assets/images/paying.gif" />
              <span>正在验证</span>
            </div>
          </div>
        </div>
      </div>
    </div>

  </div>
</template>

<script>
  import bridge from 'common/js/bridge'
  import md5 from 'js-md5';
  import {checkAgentPayPassword, codeInfo, codeList, updateCodeStatus} from 'api/register'

  /*import {versions, loadScript} from 'common/js/utl'
   import QRious from 'qrious'
   import bridge from 'common/js/bridge'*/
  export default {
    data () {
      return {
        //code: versions.ios ? require('assets/images/task/rrys_appstore.jpg') : require('assets/images/task/rrys_android.jpg'),
        unsoldNum: 0,
        soldNum: 0,
        unsoldDetail: {
          oneMonthNum: 0,
          sixMonthNum: 0,
          oneYearNum: 0,
          expiredNum: 0,
          oneMonthUnusedNum: 0,
          sixMonthUnusedNum: 0,
          oneYearUnusedNum: 0
        },
        soldDetail: {
          oneMonthNum: 0,
          sixMonthNum: 0,
          oneYearNum: 0,
          expiredNum: 0,
          oneMonthUnusedNum: 0,
          sixMonthUnusedNum: 0,
          oneYearUnusedNum: 0
        },
        current: 0,
        unsoldInfo: 0,
        soldInfo: 0,
        per: 50,
        page1: 1,
        page2: 1,
        page3: 1,
        page4: 1,
        page5: 1,
        page6: 1,
        page7: 1,
        page8: 1,
        selectAll1: false,
        selectAll2: false,
        selectAll3: false,
        selectAll4: false,
        selectAll5: false,
        selectAll6: false,
        selectAll7: false,
        selectAll8: false,
        unuse1: 0,
        choose1: 0,
        unuse2: 0,
        choose2: 0,
        unuse3: 0,
        choose3: 0,
        unuse4: 0,
        choose4: 0,
        unuse5: 0,
        choose5: 0,
        unuse6: 0,
        choose6: 0,
        unuse7: 0,
        choose7: 0,
        unuse8: 0,
        choose8: 0,
        selectArr1: [],
        selectArr2: [],
        selectArr3: [],
        selectArr4: [],
        selectArr5: [],
        selectArr6: [],
        selectArr7: [],
        selectArr8: [],
        allCodes1: '',
        allCodes2: '',
        allCodes3: '',
        allCodes4: '',
        allCodes5: '',
        allCodes6: '',
        allCodes7: '',
        allCodes8: '',
        unsold: {
          oneMonthList: [
            /*{isChosen: 0, status: 1, id: '001', code: 'Eee777', createTime: '2019-05-12'}*/
          ],
          sixMonthList: [],
          twelveMonthList: [],
          expiredList: []
        },
        sold: {
          oneMonthList: [],
          sixMonthList: [],
          twelveMonthList: [],
          expiredList: []
        },
        options1: {
          click: true,
          tap: true,
          pullUpLoad: true
        },
        options2: {
          click: true,
          tap: true,
          pullUpLoad: true
        },
        options3: {
          click: true,
          tap: true,
          pullUpLoad: true
        },
        options4: {
          click: true,
          tap: true,
          pullUpLoad: true
        },
        options5: {
          click: true,
          tap: true,
          pullUpLoad: true
        },
        options6: {
          click: true,
          tap: true,
          pullUpLoad: true
        },
        options7: {
          click: true,
          tap: true,
          pullUpLoad: true
        },
        options8: {
          click: true,
          tap: true,
          pullUpLoad: true
        },
        showNotice: false,
        unsale: 0,
        sale: 1,
        peroid0: 0,      // 已过期
        peroid1: 30,      // 1个月
        peroid2: 180,      // 6个月
        peroid3: 360,       // 12个月
        sw1: true,
        sw2: true,
        sw3: true,
        sw4: true,
        sw5: true,
        sw6: true,
        sw7: true,
        sw8: true,
        idArr1: [],
        idArr2: [],
        idArr3: [],
        idArr4: [],
        idArr5: [],
        idArr6: [],
        idArr7: [],
        idArr8: [],
        payPwd: '',
        password: {
          num1: -1,
          num2: -1,
          num3: -1,
          num4: -1,
          num5: -1,
          num6: -1
        },
        showPay: false,
        showMask: false,
        showPayLoading: false
      }
    },
    beforeRouteEnter (to, from, next) {
      next((vm) => {
        let query = to.query
        Object.assign(vm, query);
        vm.uid = query.uid;
        vm.token = query.token;
        vm.setNormalStatus();
        vm.clearPwd();
        vm.showMask = true;
        vm.showPay = true;
        vm.showPayLoading = false;
      })
    },
    computed: {

    },
    created() {

    },
    mounted() {

    },
    watch: {
      'password.num6': {
        handler(newVal, oldVal) {
          if (newVal >= 0 && this.payPwd.length == 6) {
            // console.log(this.payPwd);
            this.payPassword = md5(this.payPwd);
            // console.log(this.payPassword);
            setTimeout(() => {
              this.verifyPayPassword();
            }, 50)
          }
        },
        immediate: true,
        deep: true
      }
    },
    methods: {
      getPwd(){
        bridge.forgetPwd()
      },
      verifyPayPassword() {
        this.showPayLoading = true;
        checkAgentPayPassword({uid: this.uid, password: this.payPassword}).then((data) => {
          // console.log(data);
          if (data.status && data.status == 1) {
            this.u = data.data.u;
            this.getPageContent();
            /*setTimeout(() => {
              const toast = this.$createToast({
                time: 1000,
                txt: '支付密码验证成功',
                type: 'correct'
              });
              toast.show();
            }, 500);*/
            setTimeout(() => {
              this.showPayLoading = false;
              this.showPay = false;
              this.showMask = false;
            }, 500);
          }
        }).catch((error) => {
            // console.log(error);
            if (error.status && error.status != 1) {
              setTimeout(() => {
                this.showToast(error.info, 'warn');
              }, 500)
            }
            setTimeout(() => {
              this.showPayLoading = false;
            }, 500)
        })
        /*验证支付密码成功或者失败后将当前已经输入的支付密码清空*/
        this.password = {
          num1: -1,
          num2: -1,
          num3: -1,
          num4: -1,
          num5: -1,
          num6: -1
        };
        this.payPwd = '';
        this.payPassword = '';
      },
      getPageContent() {
        this.getCodeInfo();
        this.getCodeListUnsaleOneMonth();
        this.getCodeListUnsaleSixMonth();
        this.getCodeListUnsaleTwelveMonth();
        this.getCodeListUnsaleExpired();
        this.getCodeListSaleOneMonth();
        this.getCodeListSaleSixMonth();
        this.getCodeListSaleTwelveMonth();
        this.getCodeListSaleExpired();
      },
      getCodeInfo() {
        codeInfo().then((data) => {
          if (data.status && data.status == 1) {
            this.unsoldNum = data.data.unsoldNum;
            this.soldNum = data.data.soldNum;
            this.unsoldDetail = data.data.unsold;
            this.soldDetail = data.data.sold;
          }
        }).catch((err) => {
          this.showToast(err.info, 'warn');
        })
      },
      getCodeListUnsaleOneMonth() {
        this.unsold.oneMonthList = [];
        codeList(this.per, this.page1, this.peroid1, this.unsale).then((data) => {

          if (data.status && data.status == 1) {
            if (data.data && data.data.length > 0) {
              for(let i = 0; i < data.data.length; i++) {
                let item = data.data[i];
                this.$set(item, 'isChosen', 0);
                this.unsold.oneMonthList.push(item);
              }
              // this.unsold.oneMonthList = data.data;
            }
            if (!data.data || data.data == null || data.data.length == 0) {
              this.unsold.oneMonthList = [];
            }
          }
        }).catch((err) => {
          this.showToast(err.info, 'warn');
        })
      },
      getCodeListUnsaleSixMonth() {
        this.unsold.sixMonthList = [];
        codeList(this.per, this.page2, this.peroid2, this.unsale).then((data) => {

          if (data.status && data.status == 1) {
            if (data.data && data.data.length > 0) {
              for (let i = 0; i < data.data.length; i++) {
                let item = data.data[i];
                this.$set(item, 'isChosen', 0);
                this.unsold.sixMonthList.push(item);
              }
            }
            if (!data.data || data.data == null || data.data.length == 0) {
              this.unsold.sixMonthList = [];
            }
          }
        }).catch((err) => {
            this.showToast(err.info, 'warn');
        })
      },
      getCodeListUnsaleTwelveMonth() {
        this.unsold.twelveMonthList = [];
        codeList(this.per, this.page3, this.peroid3, this.unsale).then((data) => {

          if (data.status && data.status == 1) {
            if (data.data && data.data.length > 0) {
              for (let i = 0; i < data.data.length; i++) {
                let item = data.data[i];
                this.$set(item, 'isChosen', 0);
                this.unsold.twelveMonthList.push(item);
              }
            }
            if (!data.data || data.data == null || data.data.length == 0) {
              this.unsold.twelveMonthList = [];
            }
          }
        }).catch((err) => {
            this.showToast(err.info, 'warn');
        })
      },
      getCodeListUnsaleExpired() {
        this.unsold.expiredList = [];
        codeList(this.per, this.page4, this.peroid0, this.unsale).then((data) => {

          if (data.status && data.status == 1) {
            if (data.data && data.data.length > 0) {
              for (let i = 0; i < data.data.length; i++) {
                let item = data.data[i];
                this.$set(item, 'isChosen', 0);
                this.unsold.expiredList.push(item);
              }
            }
            if (!data.data || data.data == null || data.data.length == 0) {
              this.unsold.expiredList = [];
            }
          }
        }).catch((err) => {
          this.showToast(err.info, 'warn');
        })
      },
      getCodeListSaleOneMonth() {
        this.sold.oneMonthList = [];
        codeList(this.per, this.page5, this.peroid1, this.sale).then((data) => {

          if (data.status && data.status == 1) {
            if (data.data && data.data.length > 0) {
              for(let i = 0; i < data.data.length; i++) {
                let item = data.data[i];
                this.$set(item, 'isChosen', 0);
                this.sold.oneMonthList.push(item);
              }
              // this.unsold.oneMonthList = data.data;
            }
            if (!data.data || data.data == null || data.data.length == 0) {
              this.sold.oneMonthList = [];
            }
          }
        }).catch((err) => {
            this.showToast(err.info, 'warn');
        })
      },
      getCodeListSaleSixMonth() {
        this.sold.sixMonthList = [];
        codeList(this.per, this.page6, this.peroid2, this.sale).then((data) => {

          if (data.status && data.status == 1) {
            if (data.data && data.data.length > 0) {
              for (let i = 0; i < data.data.length; i++) {
                let item = data.data[i];
                this.$set(item, 'isChosen', 0);
                this.sold.sixMonthList.push(item);
              }
            }
            if (!data.data || data.data == null || data.data.length == 0) {
              this.sold.sixMonthList = [];
            }
          }
        }).catch((err) => {
          this.showToast(err.info, 'warn');
        })
      },
      getCodeListSaleTwelveMonth() {
        this.sold.twelveMonthList = [];
        codeList(this.per, this.page7, this.peroid3, this.sale).then((data) => {

          if (data.status && data.status == 1) {
            if (data.data && data.data.length > 0) {
              for (let i = 0; i < data.data.length; i++) {
                let item = data.data[i];
                this.$set(item, 'isChosen', 0);
                this.sold.twelveMonthList.push(item);
              }
            }
            if (!data.data || data.data == null || data.data.length == 0) {
              this.sold.twelveMonthList = [];
            }
          }
        }).catch((err) => {
          this.showToast(err.info, 'warn');
        })
      },
      getCodeListSaleExpired() {
        this.sold.expiredList = [];
        codeList(this.per, this.page8, this.peroid0, this.sale).then((data) => {

          if (data.status && data.status == 1) {
            if (data.data && data.data.length > 0) {
              for (let i = 0; i < data.data.length; i++) {
                let item = data.data[i];
                this.$set(item, 'isChosen', 0);
                this.sold.expiredList.push(item);
              }
            }
            if (!data.data || data.data == null || data.data.length == 0) {
              this.sold.expiredList = [];
            }
          }
        }).catch((err) => {
          this.showToast(err.info, 'warn');
        })
      },
      onPullingUpOne() {
        this.page1++;
        if (this.sw1) {
          codeList(this.per, this.page1, this.peroid1, this.unsale).then((data) => {
            if (data.data && data.data.length > 0) {
              for (let i = 0; i < data.data.length; i++) {
                let item = data.data[i];
                this.$set(item, 'isChosen', 0);
                this.unsold.oneMonthList.push(item);
                this.sw1 = true;
              }

              if (this.choose1 < this.unsold.oneMonthList.length) {
                this.selectAll1 = false;
              }
            }
            if (!data.data || data.data == null || data.data.length == 0) {
              this.sw1 = false;
              this.options1.pullUpLoad = false;
              return;
            }
          }).catch((err) => {
            this.showToast(err.info, 'warn');
          })
        }
      },
      onPullingUpTwo() {
        this.page2++;
        if (this.sw2) {
          codeList(this.per, this.page2, this.peroid2, this.unsale).then((data) => {
            if (data.data && data.data.length > 0) {
              for (let i = 0; i < data.data.length; i++) {
                let item = data.data[i];
                this.$set(item, 'isChosen', 0);
                this.unsold.sixMonthList.push(item);
                this.sw1 = true;
              }
              if (this.choose2 < this.unsold.sixMonthList.length) {
                this.selectAll2 = false;
              }
            }
            if (!data.data || data.data == null || data.data.length == 0) {
              this.sw2 = false;
              this.options2.pullUpLoad = false;
              return;
            }
          }).catch((err) => {
            this.showToast(err.info, 'warn');
          })
        }
      },
      onPullingUpThree() {
        this.page3++;
        if (this.sw3) {
          codeList(this.per, this.page3, this.peroid3, this.unsale).then((data) => {
            if (data.data && data.data.length > 0) {
              for (let i = 0; i < data.data.length; i++) {
                let item = data.data[i];
                this.$set(item, 'isChosen', 0);
                this.unsold.twelveMonthList.push(item);
                this.sw3 = true;
              }
              if (this.choose3 < this.unsold.twelveMonthList.length) {
                this.selectAll3 = false;
              }
            }
            if (!data.data || data.data == null || data.data.length == 0) {
              this.sw3 = false;
              this.options3.pullUpLoad = false;
              return;
            }
          }).catch((err) => {
            this.showToast(err.info, 'warn');
          })
        }
      },
      onPullingUpFour() {
        this.page4++;
        if (this.sw4) {
          codeList(this.per, this.page4, this.peroid0, this.unsale).then((data) => {
            if (data.data && data.data.length > 0) {
              for (let i = 0; i < data.data.length; i++) {
                let item = data.data[i];
                this.$set(item, 'isChosen', 0);
                this.unsold.expiredList.push(item);
                this.sw4 = true;
              }
              if (this.choose4 < this.unsold.expiredList.length) {
                this.selectAll4 = false;
              }
            }
            if (!data.data || data.data == null || data.data.length == 0) {
              this.sw4 = false;
              this.options4.pullUpLoad = false;
              return;
            }
          }).catch((err) => {
              this.showToast(err.info, 'warn');
          })
        }
      },
      onPullingUpFive() {
        this.page5++;
        if (this.sw5) {
          codeList(this.per, this.page5, this.peroid1, this.sale).then((data) => {
            if (data.data && data.data.length > 0) {
              for (let i = 0; i < data.data.length; i++) {
                let item = data.data[i];
                this.$set(item, 'isChosen', 0);
                this.sold.oneMonthList.push(item);
                this.sw5 = true;
              }

              if (this.choose5 < this.sold.oneMonthList.length) {
                this.selectAll5 = false;
              }
            }
            if (!data.data || data.data == null || data.data.length == 0) {
              this.sw5 = false;
              this.options5.pullUpLoad = false;
              return;
            }
          })
        }
      },
      onPullingUpSix() {
        this.page6++;
        if (this.sw6) {
          codeList(this.per, this.page6, this.peroid2, this.sale).then((data) => {
            if (data.data && data.data.length > 0) {
              for (let i = 0; i < data.data.length; i++) {
                let item = data.data[i];
                this.$set(item, 'isChosen', 0);
                this.sold.sixMonthList.push(item);
                this.sw6 = true;
              }
              if (this.choose6 < this.sold.sixMonthList.length) {
                this.selectAll6 = false;
              }
            }
            if (!data.data || data.data == null || data.data.length == 0) {
              this.sw6 = false;
              this.options6.pullUpLoad = false;
              return;
            }
          })
        }
      },
      onPullingUpSeven() {
        this.page7++;
        if (this.sw7) {
          codeList(this.per, this.page7, this.peroid3, this.sale).then((data) => {
            if (data.data && data.data.length > 0) {
              for (let i = 0; i < data.data.length; i++) {
                let item = data.data[i];
                this.$set(item, 'isChosen', 0);
                this.sold.twelveMonthList.push(item);
                this.sw7 = true;
              }
              if (this.choose7 < this.sold.twelveMonthList.length) {
                this.selectAll7 = false;
              }
            }
            if (!data.data || data.data == null || data.data.length == 0) {
              this.sw7 = false;
              this.options7.pullUpLoad = false;
              return;
            }
          })
        }
      },
      onPullingUpEight() {
        this.page8++;
        if (this.sw8) {
          codeList(this.per, this.page8, this.peroid0, this.sale).then((data) => {
            if (data.data && data.data.length > 0) {
              for (let i = 0; i < data.data.length; i++) {
                let item = data.data[i];
                this.$set(item, 'isChosen', 0);
                this.sold.expiredList.push(item);
                this.sw8 = true;
              }
              if (this.choose8 < this.sold.expiredList.length) {
                this.selectAll8 = false;
              }
            }
            if (!data.data || data.data == null || data.data.length == 0) {
              this.sw8 = false;
              this.options8.pullUpLoad = false;
              return;
            }
          })
        }
      },

      calculateQuantityLeft(arr) {
        if (arr && arr.length > 0) {
          for (let i = 0; i < arr.length; i++) {
            if (arr[i].status == 1) {
              this.unuse1++;
            }
          }
        }
      },
      toggleChoose(val, index, arr, id, code) {

        if (this.current == 0) {
          if (val == 0) {
            val = 1;
            /* 当前在 未售出 1个月 里面编辑状态 */
            if (this.unsoldInfo == 0) {
              this.choose1++;
              if (this.choose1 >= arr.length) {
                this.choose1 = arr.length;
                this.selectAll1 = true;
              }
              this.addArrItem(id, code, index);
            }

            /* 当前在 未售出 6个月 里面编辑状态 */
            if (this.unsoldInfo == 1) {
              this.choose2++;
              if (this.choose2 >= arr.length) {
                this.choose2 = arr.length;
                this.selectAll2 = true;
              }
              this.addArrItem(id, code, index);
            }
            /* 当前在 未售出 12个月 里面编辑状态 */
            if (this.unsoldInfo == 2) {
              this.choose3++;
              if (this.choose3 >= arr.length) {
                this.choose3 = arr.length;
                this.selectAll3 = true;
              }
              this.addArrItem(id, code, index);
            }
            /* 当前在 未售出 已过期 里面编辑状态 */
            if (this.unsoldInfo == 3) {
              this.choose4++;
              if (this.choose4 >= arr.length) {
                this.choose4 = arr.length;
                this.selectAll4 = true;
              }
              this.addArrItem(id, code, index);
            }
          } else if (val == 1) {
            val = 0;
            /* 当前再未售出 1个月 里面编辑状态 */
            if (this.unsoldInfo == 0) {
              this.choose1--;
              if (this.choose1 < arr.length) {
                this.selectAll1 = false;
              }
              this.deleteArrItem(id, code, index);
            }
            /* 当前再未售出 6个月 里面编辑状态 */
            if (this.unsoldInfo == 1) {
              this.choose2--;
              if (this.choose2 < arr.length) {
                this.selectAll2 = false;
              }
              this.deleteArrItem(id, code, index);
            }
            /* 当前再未售出 12个月 里面编辑状态 */
            if (this.unsoldInfo == 2) {
              this.choose3--;
              if (this.choose3 < arr.length) {
                this.selectAll3 = false;
              }
              this.deleteArrItem(id, code, index);
            }
            /* 当前再未售出 已过期 里面编辑状态 */
            if (this.unsoldInfo == 3) {
              this.choose4--;
              if (this.choose4 < arr.length) {
                this.selectAll4 = false;
              }
              this.deleteArrItem(id, code, index);
            }
          }
        } else if (this.current == 1) {
          if (val == 0) {
            val = 1;
            /* 当前在 已售出 1个月 里面编辑状态 */
            if (this.soldInfo == 0) {
              this.choose5++;
              if (this.choose5 >= arr.length) {
                this.choose5 = arr.length;
                this.selectAll5 = true;
              }
              this.addArrItem(id, code, index);
            }
            /* 当前在 已售出 6个月 里面编辑状态 */
            if (this.soldInfo == 1) {
              this.choose6++;
              if (this.choose6 >= arr.length) {
                this.choose6 = arr.length;
                this.selectAll6 = true;
              }
              this.addArrItem(id, code, index);
            }
            /* 当前在 已售出 12个月 里面编辑状态 */
            if (this.soldInfo == 2) {
              this.choose7++;
              if (this.choose7 >= arr.length) {
                this.choose7 = arr.length;
                this.selectAll7 = true;
              }
              this.addArrItem(id, code, index);
            }
            /* 当前在 已售出 已过期 里面编辑状态 */
            if (this.soldInfo == 3) {
              this.choose8++;
              if (this.choose8 >= arr.length) {
                this.choose8 = arr.length;
                this.selectAll8 = true;
              }
              this.addArrItem(id, code, index);
            }
          } else if (val == 1) {
            val = 0;
            /* 当前再已售出 1个月 里面编辑状态 */
            if (this.soldInfo == 0) {
              this.choose5--;
              if (this.choose5 < arr.length) {
                this.selectAll5 = false;
              }
              this.deleteArrItem(id, code, index);
            }
            /* 当前再已售出 6个月 里面编辑状态 */
            if (this.soldInfo == 1) {
              this.choose6--;
              if (this.choose6 < arr.length) {
                this.selectAll6 = false;
              }
              this.deleteArrItem(id, code, index);
            }
            /* 当前再已售出 12个月 里面编辑状态 */
            if (this.soldInfo == 2) {
              this.choose7--;
              if (this.choose7 < arr.length) {
                this.selectAll7 = false;
              }
              this.deleteArrItem(id, code, index);
            }
            /* 当前再已售出 已过期 里面编辑状态 */
            if (this.soldInfo == 3) {
              this.choose8--;
              if (this.choose8 < arr.length) {
                this.selectAll8 = false;
              }
              this.deleteArrItem(id, code, index);
            }
          }
        }


        this.$set(arr[index], 'isChosen', val);
        // this.addOrDeleteArrItem(id, code, index);
      },

      clipboardClick (val, id, code, index, arr, num) {
        /*const toast = this.$createToast({
          txt: '复制成功！',
          type: 'correct'
        });
        toast.show();*/
        this.showNotice = true;
        if (val == 1) {
          this.idArr1 = [];
          this.selectArr1 = [];
          this.allCodes1 = '';
          for (let i = 0; i < arr.length; i++) {
            if (i == index) {
              if (arr[i].isChosen == 0) {
                this.$set(arr[i], 'isChosen', 1)
              }
            } else {
              if (arr[i].isChosen == 1) {
                this.$set(arr[i], 'isChosen', 0)
              }
            }
          }
          if (this.selectAll1) {
            this.selectAll1 = false;
          }
          /*if (num == 0) {
            this.$set(arr[index], 'isChosen', 1);
          }*/
          this.choose1 = 1;
          this.addArrItem(id, code, index);

        } else if (val == 2) {
          this.idArr2 = [];
          this.selectArr2 = [];
          this.allCodes2 = '';
          for (let i = 0; i < arr.length; i++) {
            if (i == index) {
              if (arr[i].isChosen == 0) {
                this.$set(arr[i], 'isChosen', 1)
              }
            } else {
              if (arr[i].isChosen == 1) {
                this.$set(arr[i], 'isChosen', 0)
              }
            }
          }
          if (this.selectAll2) {
            this.selectAll2 = false;
          }
          /*if (num == 0) {
            this.$set(arr[index], 'isChosen', 1);
          }*/
          this.choose2 = 1;
          this.addArrItem(id, code, index);

        } else if (val == 3) {
          this.idArr3 = [];
          this.selectArr3 = [];
          this.allCodes3 = '';
          for (let i = 0; i < arr.length; i++) {
            if (i == index) {
              if (arr[i].isChosen == 0) {
                this.$set(arr[i], 'isChosen', 1)
              }
            } else {
              if (arr[i].isChosen == 1) {
                this.$set(arr[i], 'isChosen', 0)
              }
            }
          }
          if (this.selectAll3) {
            this.selectAll3 = false;
          }
          /*if (num == 0) {
            this.$set(arr[index], 'isChosen', 1);
          }*/
          this.choose3 = 1;
          this.addArrItem(id, code, index);

        } else if (val == 4) {
          this.idArr4 = [];
          this.selectArr4 = [];
          this.allCodes4 = '';
          for (let i = 0; i < arr.length; i++) {
            if (i == index) {
              if (arr[i].isChosen == 0) {
                this.$set(arr[i], 'isChosen', 1)
              }
            } else {
              if (arr[i].isChosen == 1) {
                this.$set(arr[i], 'isChosen', 0)
              }
            }
          }
          if (this.selectAll4) {
            this.selectAll4 = false;
          }
          /*if (num == 0) {
            this.$set(arr[index], 'isChosen', 1);
          }*/
          this.choose4 = 1;
          this.addArrItem(id, code, index);

        } else if (val == 5) {
          this.idArr5 = [];
          this.selectArr5 = [];
          this.allCodes5 = '';
          for (let i = 0; i < arr.length; i++) {
            if (i == index) {
              if (arr[i].isChosen == 0) {
                this.$set(arr[i], 'isChosen', 1)
              }
            } else {
              if (arr[i].isChosen == 1) {
                this.$set(arr[i], 'isChosen', 0)
              }
            }
          }
          if (this.selectAll5) {
            this.selectAll5 = false;
          }
          /*if (num == 0) {
            this.$set(arr[index], 'isChosen', 1);
          }*/
          this.choose5 = 1;
          this.addArrItem(id, code, index);

        } else if (val == 6) {
          this.idArr6 = [];
          this.selectArr6 = [];
          this.allCodes6 = '';
          for (let i = 0; i < arr.length; i++) {
            if (i == index) {
              if (arr[i].isChosen == 0) {
                this.$set(arr[i], 'isChosen', 1)
              }
            } else {
              if (arr[i].isChosen == 1) {
                this.$set(arr[i], 'isChosen', 0)
              }
            }
          }
          if (this.selectAll6) {
            this.selectAll6 = false;
          }
          /*if (num == 0) {
            this.$set(arr[index], 'isChosen', 1);
          }*/
          this.choose6 = 1;
          this.addArrItem(id, code, index);

        } else if (val == 7) {
          this.idArr7 = [];
          this.selectArr7 = [];
          this.allCodes7 = '';
          for (let i = 0; i < arr.length; i++) {
            if (i == index) {
              if (arr[i].isChosen == 0) {
                this.$set(arr[i], 'isChosen', 1)
              }
            } else {
              if (arr[i].isChosen == 1) {
                this.$set(arr[i], 'isChosen', 0)
              }
            }
          }
          if (this.selectAll7) {
            this.selectAll7 = false;
          }
          /*if (num == 0) {
            this.$set(arr[index], 'isChosen', 1);
          }*/
          this.choose7 = 1;
          this.addArrItem(id, code, index);

        } else if (val == 8) {
          this.idArr8 = [];
          this.selectArr8 = [];
          this.allCodes8 = '';
          for (let i = 0; i < arr.length; i++) {
            if (i == index) {
              if (arr[i].isChosen == 0) {
                this.$set(arr[i], 'isChosen', 1)
              }
            } else {
              if (arr[i].isChosen == 1) {
                this.$set(arr[i], 'isChosen', 0)
              }
            }
          }
          if (this.selectAll8) {
            this.selectAll8 = false;
          }
          /*if (num == 0) {
            this.$set(arr[index], 'isChosen', 1);
          }*/
          this.choose8 = 1;
          this.addArrItem(id, code, index);
        }
      },
      /*向选定数组里面插入一条*/
      addArrItem(id, code, index) {
        if (this.current == 0) {
          /* 当前在 未售出 1个月 里面 编辑状态 */
          if (this.unsoldInfo == 0) {
            let item = {
              id: id, code: code, index: index
            };
            this.selectArr1.push(item);
            this.idArr1.push(id);

          }
          /* 当前在 未售出 6个月 里面 编辑状态 */
          if (this.unsoldInfo == 1) {
            let item = {
              id: id, code: code, index: index
            };
            this.selectArr2.push(item);
            this.idArr2.push(id);

          }
          /* 当前在 未售出 12个月 里面 编辑状态 */
          if (this.unsoldInfo == 2) {
            let item = {
              id: id, code: code, index: index
            };
            this.selectArr3.push(item);
            this.idArr3.push(id);

          }
          /* 当前在 未售出 12个月 里面 编辑状态 */
          if (this.unsoldInfo == 3) {
            let item = {
              id: id, code: code, index: index
            };
            this.selectArr4.push(item);
            this.idArr4.push(id);

          }
        } else if (this.current == 1) {
          /* 当前在 已售出 1个月 里面 编辑状态 */
          if (this.soldInfo == 0) {
            let item = {
              id: id, code: code, index: index
            };
            this.selectArr5.push(item);
            this.idArr5.push(id);

          }
          /* 当前在 已售出 6个月 里面 编辑状态 */
          if (this.soldInfo == 1) {
            let item = {
              id: id, code: code, index: index
            };
            this.selectArr6.push(item);
            this.idArr6.push(id);

          }
          /* 当前在 已售出 12个月 里面 编辑状态 */
          if (this.soldInfo == 2) {
            let item = {
              id: id, code: code, index: index
            };
            this.selectArr7.push(item);
            this.idArr7.push(id);

          }
          /* 当前在 已售出 12个月 里面 编辑状态 */
          if (this.soldInfo == 3) {
            let item = {
              id: id, code: code, index: index
            };
            this.selectArr8.push(item);
            this.idArr8.push(id);

          }
        }
        this.getCurrentAllCodes();
      },
      deleteArrItem(id, code, index) {
        if (this.current == 0) {
          /* 当前在 未售出 1个月 里面 编辑状态 */
          if (this.unsoldInfo == 0) {
            if (this.selectArr1.length > 0) {
              for (let i = 0; i < this.selectArr1.length; i++) {
                if (id == this.selectArr1[i].id) {
                  this.selectArr1.splice(i, 1);
                }
              }
            }
            if (this.idArr1.length > 0) {
              for (let j = 0; j < this.idArr1.length; j++) {
                if (id == this.idArr1[j]) {
                  this.idArr1.splice(j, 1);
                }
              }

            }
          }

          /* 当前在 未售出 6个月 里面 编辑状态 */
          if (this.unsoldInfo == 1) {
            if (this.selectArr2.length > 0) {
              for (let i = 0; i < this.selectArr2.length; i++) {
                if (id == this.selectArr2[i].id) {
                  this.selectArr2.splice(i, 1);
                }
              }
            }
            if (this.idArr2.length > 0) {
              for (let j = 0; j < this.idArr2.length; j++) {
                if (id == this.idArr2[j]) {
                  this.idArr2.splice(j, 1);
                }
              }

            }
          }

          /* 当前在 未售出 12个月 里面 编辑状态 */
          if (this.unsoldInfo == 2) {
            if (this.selectArr3.length > 0) {
              for (let i = 0; i < this.selectArr3.length; i++) {
                if (id == this.selectArr3[i].id) {
                  this.selectArr3.splice(i, 1);
                }
              }
            }
            if (this.idArr3.length > 0) {
              for (let j = 0; j < this.idArr3.length; j++) {
                if (id == this.idArr3[j]) {
                  this.idArr3.splice(j, 1);
                }
              }

            }
          }

          /* 当前在 未售出 已过期 里面 编辑状态 */
          if (this.unsoldInfo == 3) {
            if (this.selectArr4.length > 0) {
              for (let i = 0; i < this.selectArr4.length; i++) {
                if (id == this.selectArr4[i].id) {
                  this.selectArr4.splice(i, 1);
                }
              }
            }
            if (this.idArr4.length > 0) {
              for (let j = 0; j < this.idArr4.length; j++) {
                if (id == this.idArr4[j]) {
                  this.idArr4.splice(j, 1);
                }
              }

            }
          }
        } else if (this.current == 1) {
          /* 当前在 已售出 1个月 里面 编辑状态 */
          if (this.soldInfo == 0) {
            if (this.selectArr5.length > 0) {
              for (let i = 0; i < this.selectArr5.length; i++) {
                if (id == this.selectArr5[i].id) {
                  this.selectArr5.splice(i, 1);
                }
              }
            }
            if (this.idArr5.length > 0) {
              for (let j = 0; j < this.idArr5.length; j++) {
                if (id == this.idArr5[j]) {
                  this.idArr5.splice(j, 1);
                }
              }

            }
          }
          /* 当前在 已售出 6个月 里面 编辑状态 */
          if (this.soldInfo == 1) {
            if (this.selectArr6.length > 0) {
              for (let i = 0; i < this.selectArr6.length; i++) {
                if (id == this.selectArr6[i].id) {
                  this.selectArr6.splice(i, 1);
                }
              }
            }
            if (this.idArr6.length > 0) {
              for (let j = 0; j < this.idArr6.length; j++) {
                if (id == this.idArr6[j]) {
                  this.idArr6.splice(j, 1);
                }
              }

            }
          }
          /* 当前在 已售出 12个月 里面 编辑状态 */
          if (this.soldInfo == 2) {
            if (this.selectArr7.length > 0) {
              for (let i = 0; i < this.selectArr7.length; i++) {
                if (id == this.selectArr7[i].id) {
                  this.selectArr7.splice(i, 1);
                }
              }
            }
            if (this.idArr7.length > 0) {
              for (let j = 0; j < this.idArr7.length; j++) {
                if (id == this.idArr7[j]) {
                  this.idArr7.splice(j, 1);
                }
              }

            }
          }
          /* 当前在 已售出 已过期 里面 编辑状态 */
          if (this.soldInfo == 3) {
            if (this.selectArr8.length > 0) {
              for (let i = 0; i < this.selectArr8.length; i++) {
                if (id == this.selectArr8[i].id) {
                  this.selectArr8.splice(i, 1);
                }
              }
            }
            if (this.idArr8.length > 0) {
              for (let j = 0; j < this.idArr8.length; j++) {
                if (id == this.idArr8[j]) {
                  this.idArr8.splice(j, 1);
                }
              }

            }
          }
        }
        this.getCurrentAllCodes();
      },
      toggleSelectAll(arr) {
        if (arr && arr.length > 0) {
          if (this.current == 0) {
            /* 当前在未售出 1个月里面编辑状态 */
            if (this.unsoldInfo == 0) {
              this.selectAll1 = !this.selectAll1;
              if (this.selectAll1) {
                this.idArr1 = [];
                this.selectArr1 = [];
                this.choose1 = arr.length;
                for (let i = 0; i < arr.length; i++) {
                  let item = {
                    index: i, code: arr[i].code, id: arr[i].id
                  };
                  this.idArr1.push(item.id);
                  this.selectArr1.push(item);
                  if (arr[i].isChosen == 0) {
                    this.$set(arr[i], 'isChosen', 1)
                  }
                }


                this.getCurrentAllCodes();
              } else {
                this.idArr1 = [];
                this.selectArr1 = [];
                this.choose1 = 0;
                for (let i = 0; i < arr.length; i++) {
                  if (arr[i].isChosen == 1) {
                    this.$set(arr[i], 'isChosen', 0)
                  }
                }

              }
            }
            /* 当前在未售出 6个月里面编辑状态 */
            if (this.unsoldInfo == 1) {
              this.selectAll2 = !this.selectAll2;
              if (this.selectAll2) {
                this.idArr2 = [];
                this.selectArr2 = [];
                this.choose2 = arr.length;
                for (let i = 0; i < arr.length; i++) {
                  let item = {
                    index: i, code: arr[i].code, id: arr[i].id
                  };
                  this.idArr2.push(item.id);
                  this.selectArr2.push(item);
                  if (arr[i].isChosen == 0) {
                    this.$set(arr[i], 'isChosen', 1)
                  }
                }

                this.getCurrentAllCodes();
              } else {
                this.idArr2 = [];
                this.selectArr2 = [];
                this.choose2 = 0;
                for (let i = 0; i < arr.length; i++) {
                  if (arr[i].isChosen == 1) {
                    this.$set(arr[i], 'isChosen', 0)
                  }
                }

              }
            }
            /* 当前在未售出 12个月里面编辑状态 */
            if (this.unsoldInfo == 2) {
              this.selectAll3 = !this.selectAll3;
              if (this.selectAll3) {
                this.idArr3 = [];
                this.selectArr3 = [];
                this.choose3 = arr.length;
                for (let i = 0; i < arr.length; i++) {
                  let item = {
                    index: i, code: arr[i].code, id: arr[i].id
                  };
                  this.idArr3.push(item.id);
                  this.selectArr3.push(item);
                  if (arr[i].isChosen == 0) {
                    this.$set(arr[i], 'isChosen', 1)
                  }
                }

                this.getCurrentAllCodes();
              } else {
                this.idArr3 = [];
                this.selectArr3 = [];
                this.choose3 = 0;
                for (let i = 0; i < arr.length; i++) {
                  if (arr[i].isChosen == 1) {
                    this.$set(arr[i], 'isChosen', 0)
                  }
                }

              }
            }
            /* 当前在未售出 已过期里面编辑状态 */
            if (this.unsoldInfo == 3) {
              this.selectAll4 = !this.selectAll4;
              if (this.selectAll4) {
                this.idArr4 = [];
                this.selectArr4 = [];
                this.choose4 = arr.length;
                for (let i = 0; i < arr.length; i++) {
                  let item = {
                    index: i, code: arr[i].code, id: arr[i].id
                  };
                  this.idArr4.push(item.id);
                  this.selectArr4.push(item);
                  if (arr[i].isChosen == 0) {
                    this.$set(arr[i], 'isChosen', 1)
                  }
                }

                this.getCurrentAllCodes();
              } else {
                this.idArr4 = [];
                this.selectArr4 = [];
                this.choose4 = 0;
                for (let i = 0; i < arr.length; i++) {
                  if (arr[i].isChosen == 1) {
                    this.$set(arr[i], 'isChosen', 0)
                  }
                }

              }
            }
          } else if (this.current == 1) {
            /* 当前在 已售出 1个月里面编辑状态 */
            if (this.soldInfo == 0) {
              this.selectAll5 = !this.selectAll5;
              if (this.selectAll5) {
                this.idArr5 = [];
                this.selectArr5 = [];
                this.choose5 = arr.length;
                for (let i = 0; i < arr.length; i++) {
                  let item = {
                    index: i, code: arr[i].code, id: arr[i].id
                  };
                  this.idArr5.push(item.id);
                  this.selectArr5.push(item);
                  if (arr[i].isChosen == 0) {
                    this.$set(arr[i], 'isChosen', 1)
                  }
                }

                this.getCurrentAllCodes();
              } else {
                this.idArr5 = [];
                this.selectArr5 = [];
                this.choose5 = 0;
                for (let i = 0; i < arr.length; i++) {
                  if (arr[i].isChosen == 1) {
                    this.$set(arr[i], 'isChosen', 0)
                  }
                }

              }
            }
            /* 当前在 已售出 6个月里面编辑状态 */
            if (this.soldInfo == 1) {
              this.selectAll6 = !this.selectAll6;
              if (this.selectAll6) {
                this.idArr6 = [];
                this.selectArr6 = [];
                this.choose6 = arr.length;
                for (let i = 0; i < arr.length; i++) {
                  let item = {
                    index: i, code: arr[i].code, id: arr[i].id
                  };
                  this.idArr6.push(item.id);
                  this.selectArr6.push(item);
                  if (arr[i].isChosen == 0) {
                    this.$set(arr[i], 'isChosen', 1)
                  }
                }

                this.getCurrentAllCodes();
              } else {
                this.idArr6 = [];
                this.selectArr6 = [];
                this.choose6 = 0;
                for (let i = 0; i < arr.length; i++) {
                  if (arr[i].isChosen == 1) {
                    this.$set(arr[i], 'isChosen', 0)
                  }
                }

              }
            }
            /* 当前在 已售出 12个月里面编辑状态 */
            if (this.soldInfo == 2) {
              this.selectAll7 = !this.selectAll7;
              if (this.selectAll7) {
                this.idArr7 = [];
                this.selectArr7 = [];
                this.choose7 = arr.length;
                for (let i = 0; i < arr.length; i++) {
                  let item = {
                    index: i, code: arr[i].code, id: arr[i].id
                  };
                  this.idArr7.push(item.id);
                  this.selectArr7.push(item);
                  if (arr[i].isChosen == 0) {
                    this.$set(arr[i], 'isChosen', 1)
                  }
                }

                this.getCurrentAllCodes();
              } else {
                this.idArr7 = [];
                this.selectArr7 = [];
                this.choose7 = 0;
                for (let i = 0; i < arr.length; i++) {
                  if (arr[i].isChosen == 1) {
                    this.$set(arr[i], 'isChosen', 0)
                  }
                }

              }
            }
            /* 当前在 已售出 已过期里面编辑状态 */
            if (this.soldInfo == 3) {
              this.selectAll8 = !this.selectAll8;
              if (this.selectAll8) {
                this.idArr8 = [];
                this.selectArr8 = [];
                this.choose8 = arr.length;
                for (let i = 0; i < arr.length; i++) {
                  let item = {
                    index: i, code: arr[i].code, id: arr[i].id
                  };
                  this.idArr8.push(item.id);
                  this.selectArr8.push(item);
                  if (arr[i].isChosen == 0) {
                    this.$set(arr[i], 'isChosen', 1)
                  }
                }

                this.getCurrentAllCodes();
              } else {
                this.idArr8 = [];
                this.selectArr8 = [];
                this.choose8 = 0;
                for (let i = 0; i < arr.length; i++) {
                  if (arr[i].isChosen == 1) {
                    this.$set(arr[i], 'isChosen', 0)
                  }
                }

              }
            }
          }
        }
      },
      getCurrentAllCodes() {
        if (this.current == 0) {
          /*未售出*/
          if (this.unsoldInfo == 0) {
            if (this.choose1 == 0) {
              return;
            }
            this.allCodes1 = '';
            if (this.choose1 < this.unsold.oneMonthList.length) {
              this.selectArr1 = this.sortArray(this.selectArr1);

              for (let i = 0; i < this.selectArr1.length; i++) {
                this.allCodes1 += this.selectArr1[i].code + '\r\n';
              }
            }
            if (this.choose1 == this.unsold.oneMonthList.length) {
              for (let i = 0; i < this.unsold.oneMonthList.length; i++) {
                this.allCodes1 += this.unsold.oneMonthList[i].code + '\r\n';
              }
            }
          }
          if (this.unsoldInfo == 1) {
            if (this.choose2 == 0) {
              return;
            }
            this.allCodes2 = '';
            if (this.choose2 < this.unsold.sixMonthList.length) {
              this.selectArr2 = this.sortArray(this.selectArr2);

              for (let i = 0; i < this.selectArr2.length; i++) {
                this.allCodes2 += this.selectArr2[i].code + '\r\n';
              }
            }
            if (this.choose2 == this.unsold.sixMonthList.length) {
              for (let i = 0; i < this.unsold.sixMonthList.length; i++) {
                this.allCodes2 += this.unsold.sixMonthList[i].code + '\r\n';
              }
            }
          }
          if (this.unsoldInfo == 2) {
            if (this.choose3 == 0) {
              return;
            }
            this.allCodes3 = '';
            if (this.choose3 < this.unsold.twelveMonthList.length) {
              this.selectArr3 = this.sortArray(this.selectArr3);

              for (let i = 0; i < this.selectArr3.length; i++) {
                this.allCodes3 += this.selectArr3[i].code + '\r\n';
              }
            }
            if (this.choose3 == this.unsold.twelveMonthList.length) {
              for (let i = 0; i < this.unsold.twelveMonthList.length; i++) {
                this.allCodes3 += this.unsold.twelveMonthList[i].code + '\r\n';
              }
            }
          }
          if (this.unsoldInfo == 3) {
            if (this.choose4 == 0) {
              return;
            }
            this.allCodes4 = '';
            if (this.choose4 < this.unsold.expiredList.length) {
              this.selectArr4 = this.sortArray(this.selectArr4);

              for (let i = 0; i < this.selectArr4.length; i++) {
                this.allCodes4 += this.selectArr4[i].code + '\r\n';
              }
            }
            if (this.choose4 == this.unsold.expiredList.length) {
              for (let i = 0; i < this.unsold.expiredList.length; i++) {
                this.allCodes4 += this.unsold.expiredList[i].code + '\r\n';
              }
            }
          }
        } else if (this.current == 1) {
          /*已售出*/
          if (this.soldInfo == 0) {
            if (this.choose5 == 0) {
              return;
            }
            this.allCodes5 = '';
            if (this.choose5 < this.sold.oneMonthList.length) {
              this.selectArr5 = this.sortArray(this.selectArr5);

              for (let i = 0; i < this.selectArr5.length; i++) {
                this.allCodes5 += this.selectArr5[i].code + '\r\n';
              }
            }
            if (this.choose5 == this.sold.oneMonthList.length) {
              for (let i = 0; i < this.sold.oneMonthList.length; i++) {
                this.allCodes5 += this.sold.oneMonthList[i].code + '\r\n';
              }
            }
          }
          if (this.soldInfo == 1) {
            if (this.choose6 == 0) {
              return;
            }
            this.allCodes6 = '';
            if (this.choose6 < this.sold.sixMonthList.length) {
              this.selectArr6 = this.sortArray(this.selectArr6);

              for (let i = 0; i < this.selectArr6.length; i++) {
                this.allCodes6 += this.selectArr6[i].code + '\r\n';
              }
            }
            if (this.choose6 == this.sold.sixMonthList.length) {
              for (let i = 0; i < this.sold.sixMonthList.length; i++) {
                this.allCodes6 += this.sold.sixMonthList[i].code + '\r\n';
              }
            }
          }
          if (this.soldInfo == 2) {
            if (this.choose7 == 0) {
              return;
            }
            this.allCodes7 = '';
            if (this.choose7 < this.sold.twelveMonthList.length) {
              this.selectArr7 = this.sortArray(this.selectArr7);

              for (let i = 0; i < this.selectArr7.length; i++) {
                this.allCodes7 += this.selectArr7[i].code + '\r\n';
              }
            }
            if (this.choose7 == this.sold.twelveMonthList.length) {
              for (let i = 0; i < this.sold.twelveMonthList.length; i++) {
                this.allCodes7 += this.sold.twelveMonthList[i].code + '\r\n';
              }
            }
          }
          if (this.soldInfo == 3) {
            if (this.choose8 == 0) {
              return;
            }
            this.allCodes8 = '';
            if (this.choose8 < this.sold.expiredList.length) {
              this.selectArr8 = this.sortArray(this.selectArr8);

              for (let i = 0; i < this.selectArr8.length; i++) {
                this.allCodes8 += this.selectArr8[i].code + '\r\n';
              }
            }
            if (this.choose8 == this.sold.expiredList.length) {
              for (let i = 0; i < this.sold.expiredList.length; i++) {
                this.allCodes8 += this.sold.expiredList[i].code + '\r\n';
              }
            }
          }
        }

      },
      /*数组按组内某一个元素的大小来进行排序*/
      sortArray(arr) {
        if (arr && arr.length > 0) {
          for (let i = 0; i < arr.length; i++) {
            for (let j = i + 1; j < arr.length; j++) {
              if (arr[i].index > arr[j].index) {
                let temp = arr[j];
                arr[j] = arr[i];
                arr[i] = temp;
              }
            }
          }
        }
        return arr;
      },
      changeTitle(num) {
        this.current = num;
        if (this.current == 0) {
          if (this.unsoldInfo == 0) {
            this.$nextTick(() => {
              this.$refs.scroll1.refresh();
            })
          } else if (this.unsoldInfo == 1) {
            this.$nextTick(() => {
              this.$refs.scroll2.refresh();
            })
          } else if (this.unsoldInfo == 2) {
            this.$nextTick(() => {
              this.$refs.scroll3.refresh();
            })
          } else if (this.unsoldInfo == 3) {
            this.$nextTick(() => {
              this.$refs.scroll4.refresh();
            })
          }
        } else if (this.current == 1) {
          if (this.soldInfo == 0) {
            this.$nextTick(() => {
              this.$refs.scroll5.refresh();
            })
          } else if (this.soldInfo == 1) {
            this.$nextTick(() => {
              this.$refs.scroll6.refresh();
            })
          } else if (this.soldInfo == 2) {
            this.$nextTick(() => {
              this.$refs.scroll7.refresh();
            })
          } else if (this.soldInfo == 3) {
            this.$nextTick(() => {
              this.$refs.scroll8.refresh();
            })
          }
        }
      },
      checkUnsoldInfo(num) {
        this.unsoldInfo = num;
        if (num == 0) {
          this.$nextTick(() => {
            this.$refs.scroll1.refresh();
          })
        } else if (num == 1) {
          this.$nextTick(() => {
            this.$refs.scroll2.refresh();
          })
        } else if (num == 2) {
          this.$nextTick(() => {
            this.$refs.scroll3.refresh();
          })
        } else if (num == 3) {
          this.$nextTick(() => {
            this.$refs.scroll4.refresh();
          })
        }
      },
      checkSoldInfo(num) {
        this.soldInfo = num;
        if (num == 0) {
          this.$nextTick(() => {
            this.$refs.scroll5.refresh();
          })
        } else if (num == 1) {
          this.$nextTick(() => {
            this.$refs.scroll6.refresh();
          })
        } else if (num == 2) {
          this.$nextTick(() => {
            this.$refs.scroll7.refresh();
          })
        } else if (num == 3) {
          this.$nextTick(() => {
            this.$refs.scroll8.refresh();
          })
        }
      },
      hidePopup(){
        this.$router.back();
        this.$refs.popup.hide()
      },
      formatDateTime(time) {
        let date = new Date();
        date.setTime(time * 1000);
        let y = date.getFullYear();
        let m = date.getMonth() + 1;
        m = m < 10 ? ('0' + m) : m;
        let d = date.getDate();
        d = d < 10 ? ('0' + d) : d;
        return y + '/' + m + '/' + d;
      },
      closeActive () {
        this.$refs.popup.hide();
      },

      copyAllNotice() {
        /*const toast = this.$createToast({
          txt: '所选升级码复制成功！',
          type: 'correct'
        });
        toast.show();*/
        this.showNotice = true;
      },
      cancelMark() {
        this.showNotice = false;
      },
      confirmMark(val) {
        if (val == 1) {
          let id = JSON.stringify(this.idArr1);

          updateCodeStatus(id, this.sale).then((data) => {
            this.showNotice = false;
            if (this.selectAll1) {
              this.selectAll1 = false;
              this.choose1 = 0;
              if (this.sw1) {
                // this.page1++;
                this.getCodeListUnsaleOneMonth();
              }
            }
            this.getCodeInfo();
            this.unsold.oneMonthList = this.mergeArray(this.unsold.oneMonthList, this.idArr1);
            this.idArr1 = [];
            this.selectArr1 = [];
            this.allCodes1 = '';
            this.choose1 = 0;
            this.page5 = 1;
            this.sw5 = true;
            this.options5.pullUpLoad = true;
            this.getCodeListSaleOneMonth();

          }).catch((err) => {
            this.showToast(err.info, 'warn');
          })
        }

        if (val == 2) {
          let id = JSON.stringify(this.idArr2);

          updateCodeStatus(id, this.sale).then((data) => {
            this.showNotice = false;
            if (this.selectAll2) {
              this.selectAll2 = false;
              this.choose2 = 0;
              if (this.sw2) {
                // this.page1++;
                this.getCodeListUnsaleSixMonth();
              }
            }
            this.getCodeInfo();
            this.unsold.sixMonthList = this.mergeArray(this.unsold.sixMonthList, this.idArr2);
            this.idArr2 = [];
            this.selectArr2 = [];
            this.allCodes2 = '';
            this.choose2 = 0;
            this.page6 = 1;
            this.sw6 = true;
            this.options6.pullUpLoad = true;
            this.getCodeListSaleSixMonth();

          }).catch((err) => {
              this.showToast(err.info, 'warn');
          })
        }

        if (val == 3) {
          let id = JSON.stringify(this.idArr3);

          updateCodeStatus(id, this.sale).then((data) => {
            this.showNotice = false;
            if (this.selectAll3) {
              this.selectAll3 = false;
              this.choose3 = 0;
              if (this.sw3) {
                // this.page1++;
                this.getCodeListUnsaleTwelveMonth();
              }
            }
            this.getCodeInfo();
            this.unsold.twelveMonthList = this.mergeArray(this.unsold.twelveMonthList, this.idArr3);
            this.idArr3 = [];
            this.selectArr3 = [];
            this.allCodes3 = '';
            this.choose3 = 0;
            this.page7 = 1;
            this.sw7 = true;
            this.options7.pullUpLoad = true;
            this.getCodeListSaleTwelveMonth();

          }).catch((err) => {
              this.showToast(err.info, 'warn');
          })
        }
        if (val == 4) {
          let id = JSON.stringify(this.idArr4);

          updateCodeStatus(id, this.sale).then((data) => {
            this.showNotice = false;
            if (this.selectAll4) {
              this.selectAll4 = false;
              this.choose4 = 0;
              if (this.sw4) {
                // this.page1++;
                this.getCodeListUnsaleExpired();
              }
            }
            this.getCodeInfo();
            this.unsold.expiredList = this.mergeArray(this.unsold.expiredList, this.idArr4);
            this.idArr4 = [];
            this.selectArr4 = [];
            this.allCodes4 = '';
            this.choose4 = 0;
            this.page8 = 1;
            this.sw8 = true;
            this.options8.pullUpLoad = true;
            this.getCodeListSaleExpired();

          }).catch((err) => {
              this.showToast(err.info, 'warn');
          })
        }

        if (val == 5) {
          let id = JSON.stringify(this.idArr5);

          updateCodeStatus(id, this.unsale).then((data) => {
            this.showNotice = false;
            if (this.selectAll5) {
              this.selectAll5 = false;
              this.choose5 = 0;
              if (this.sw5) {
                // this.page1++;
                this.getCodeListSaleOneMonth();
              }
            }
            this.getCodeInfo();
            this.sold.oneMonthList = this.mergeArray(this.sold.oneMonthList, this.idArr5);
            this.idArr5 = [];
            this.selectArr5 = [];
            this.allCodes5 = '';
            this.choose5 = 0;
            this.page1 = 1;
            this.sw1 = true;
            this.options1.pullUpLoad = true;
            this.getCodeListUnsaleOneMonth();

          }).catch((err) => {
              this.showToast(err.info, 'warn');
          })
        }

        if (val == 6) {
          let id = JSON.stringify(this.idArr6);

          updateCodeStatus(id, this.unsale).then((data) => {
            this.showNotice = false;
            if (this.selectAll6) {
              this.selectAll6 = false;
              this.choose6 = 0;
              if (this.sw6) {
                // this.page1++;
                this.getCodeListSaleSixMonth();
              }
            }
            this.getCodeInfo();
            this.sold.sixMonthList = this.mergeArray(this.sold.sixMonthList, this.idArr6);
            this.idArr6 = [];
            this.selectArr6 = [];
            this.allCodes6 = '';
            this.choose6 = 0;
            this.page2 = 1;
            this.sw2 = true;
            this.options2.pullUpLoad = true;
            this.getCodeListUnsaleSixMonth();

          }).catch((err) => {
              this.showToast(err.info, 'warn');
          })
        }

        if (val == 7) {
          let id = JSON.stringify(this.idArr7);

          updateCodeStatus(id, this.unsale).then((data) => {
            this.showNotice = false;
            if (this.selectAll7) {
              this.selectAll7 = false;
              this.choose7 = 0;
              if (this.sw7) {
                // this.page1++;
                this.getCodeListSaleTwelveMonth();
              }
            }
            this.getCodeInfo();
            this.sold.twelveMonthList = this.mergeArray(this.sold.twelveMonthList, this.idArr7);
            this.idArr7 = [];
            this.selectArr7 = [];
            this.allCodes7 = '';
            this.choose7 = 0;
            this.page3 = 1;
            this.sw3 = true;
            this.options3.pullUpLoad = true;
            this.getCodeListUnsaleTwelveMonth();

          }).catch((err) => {
              this.showToast(err.info, 'warn');
          })
        }

        if (val == 8) {
          let id = JSON.stringify(this.idArr8);

          updateCodeStatus(id, this.unsale).then((data) => {
            this.showNotice = false;
            if (this.selectAll8) {
              this.selectAll8 = false;
              this.choose8 = 0;
              if (this.sw8) {
                // this.page1++;
                this.getCodeListSaleExpired();
              }
            }
            this.getCodeInfo();
            this.sold.expiredList = this.mergeArray(this.sold.expiredList, this.idArr8);
            this.idArr8 = [];
            this.selectArr8 = [];
            this.allCodes8 = '';
            this.choose8 = 0;
            this.page4 = 1;
            this.sw4 = true;
            this.options4.pullUpLoad = true;
            this.getCodeListUnsaleExpired();

          }).catch((err) => {
              this.showToast(err.info, 'warn');
          })
        }


      },
      // 把选中后改变状态的值从原数组中删除
      mergeArray(a, b) {
        // console.log(arr1, arr2);
        for (let i = 0; i < b.length; i++) {
          for (let j = 0; j < a.length; j++) {
            if (a[j].id == b[i]) {
              a.splice(j, 1);
              j = j - 1;
            }
          }
        }
        /*for (let i = 0; i < arr1.length; i++) {
          for (let j = 0; j < arr2.length; j++) {
            if (arr1[i].id == arr2[j]) {
              arr1.splice(i, 1);
            }
          }
        }*/
        /*if (arr1.length > 0 && arr2.length > 0) {
          for (let i = 0; i < arr1.length; i++) {
            for (let j = 0; j < arr2.length; j++) {
              if (arr1[i].id == arr2[j]) {
                arr1.splice(i, 1);
              }
            }
          }
        }*/
        return a;
      },
      closeMask(ev) {
        /*if (!this.$refs.maskContent.contains(ev.target)) {
          this.showMask = false;
        }*/
      },
      setNormalStatus() {
        this.unsoldNum = 0;
        this.soldNum = 0;
        this.unsoldDetail = {
          oneMonthNum: 0,
          sixMonthNum: 0,
          oneYearNum: 0,
          expiredNum: 0,
          oneMonthUnusedNum: 0,
          sixMonthUnusedNum: 0,
          oneYearUnusedNum: 0
        };
        this.soldDetail = {
          oneMonthNum: 0,
          sixMonthNum: 0,
          oneYearNum: 0,
          expiredNum: 0,
          oneMonthUnusedNum: 0,
          sixMonthUnusedNum: 0,
          oneYearUnusedNum: 0
        };
        this.current = 0;
        this.unsoldInfo = 0;
        this.soldInfo = 0;
        this.page1 = 1;
        this.page2 = 1;
        this.page3 = 1;
        this.page4 = 1;
        this.page5 = 1;
        this.page6 = 1;
        this.page7 = 1;
        this.page8 = 1;
        this.choose1 = 0;
        this.choose2 = 0;
        this.choose3 = 0;
        this.choose4 = 0;
        this.choose5 = 0;
        this.choose6 = 0;
        this.choose7 = 0;
        this.choose8 = 0;
        this.selectAll1 = false;
        this.selectAll2 = false;
        this.selectAll3 = false;
        this.selectAll4 = false;
        this.selectAll5 = false;
        this.selectAll6 = false;
        this.selectAll7 = false;
        this.selectAll8 = false;
        this.selectArr1 = [];
        this.selectArr2 = [];
        this.selectArr3 = [];
        this.selectArr4 = [];
        this.selectArr5 = [];
        this.selectArr6 = [];
        this.selectArr7 = [];
        this.selectArr8 = [];
        this.idArr1 = [];
        this.idArr2 = [];
        this.idArr3 = [];
        this.idArr4 = [];
        this.idArr5 = [];
        this.idArr6 = [];
        this.idArr7 = [];
        this.idArr8 = [];
        this.allCodes1 = '';
        this.allCodes2 = '';
        this.allCodes3 = '';
        this.allCodes4 = '';
        this.allCodes5 = '';
        this.allCodes6 = '';
        this.allCodes7 = '';
        this.allCodes8 = '';
        this.options1.pullUpLoad = true;
        this.options2.pullUpLoad = true;
        this.options3.pullUpLoad = true;
        this.options4.pullUpLoad = true;
        this.options5.pullUpLoad = true;
        this.options6.pullUpLoad = true;
        this.options7.pullUpLoad = true;
        this.options8.pullUpLoad = true;
        this.unsold = {
          oneMonthList: [],
          sixMonthList: [],
          twelveMonthList: [],
          expiredList: []
        };
        this.sold = {
          oneMonthList: [],
          sixMonthList: [],
          twelveMonthList: [],
          expiredList: []
        };
        this.sw1 = true;
        this.sw2 = true;
        this.sw3 = true;
        this.sw4 = true;
        this.sw5 = true;
        this.sw6 = true;
        this.sw7 = true;
        this.sw8 = true;
      },
      clearPwd() {
        /*关闭弹框时将当前已经输入的支付密码清空*/
        this.password = {
          num1: -1,
          num2: -1,
          num3: -1,
          num4: -1,
          num5: -1,
          num6: -1
        };
        this.payPwd = '';
        this.payPassword = '';
      },
      chooseNum(val) {
        // console.log(this.payPwd.length);
        if (this.payPwd.length == 0) {
          this.password.num1 = val;
          this.payPwd += val;
        } else if (this.payPwd.length == 1) {
          this.password.num2 = val;
          this.payPwd += val;
        } else if (this.payPwd.length == 2) {
          this.password.num3 = val;
          this.payPwd += val;
        } else if (this.payPwd.length == 3) {
          this.password.num4 = val;
          this.payPwd += val;
        } else if (this.payPwd.length == 4) {
          this.password.num5 = val;
          this.payPwd += val;
        } else if (this.payPwd.length == 5) {
          this.password.num6 = val;
          this.payPwd += val;
        }
        // console.log(this.payPwd);
      },
      deletePwd() {
        // console.log(this.payPwd.length);
        if (this.payPwd.length == 0) {
          return;
        } else if (this.payPwd.length == 1) {
          this.password.num1 = -1;
          this.payPwd = '';
        } else if (this.payPwd.length == 2) {
          this.password.num2 = -1;
          this.payPwd = this.payPwd.substring(0, this.payPwd.length - 1)
        } else if (this.payPwd.length == 3) {
          this.password.num3 = -1;
          this.payPwd = this.payPwd.substring(0, this.payPwd.length - 1)
        } else if (this.payPwd.length == 4) {
          this.password.num4 = -1;
          this.payPwd = this.payPwd.substring(0, this.payPwd.length - 1)
        } else if (this.payPwd.length == 5) {
          this.password.num5 = -1;
          this.payPwd = this.payPwd.substring(0, this.payPwd.length - 1)
        } else if (this.payPwd.length == 6) {
          this.password.num6 = -1;
          this.payPwd = this.payPwd.substring(0, this.payPwd.length - 1)
        }
        // console.log(this.payPwd);
      },
      showToast(msg, type) {
        const toast = this.$createToast({
          time: 2000,
          txt: msg,
          type: type
        });
        toast.show();
      },
      showToastNotice(txt) {
        const toast = this.$createToast({
          time: 1000,
          txt: txt
        });
        toast.show();
        setTimeout(() => {
          toast.hide();
        }, 2000);
      }
    }
  }
</script>

<style lang="scss" scoped>
  @import 'common/scss/index.scss';
  body,html{
    height:100%;
  }
  .pag {
    height: 100%;
    background: #F5F5FB;
    /*overflow-x:hidden;
    overflow-y:auto;*/
  }
  .member-service{
    display:flex;
    height:72px;
    line-height:72px;
    margin:0 30px;
    border-radius:10px 10px 0 0;
    background: #E5E5E9;
    div{
      flex:1;
      width:50%;
      text-align:center;
      font-size:30px;
      color:#838899;
    }
    .selected{
      position:relative;
      border-radius:10px 10px 0 0;
      background:rgba(255,255,255,1);
      color:#202C5B;
      font-weight:600;
      /*&:after{
        content: "";
        position: absolute;
        transform: translateX(-50%);
        left: 50%;
        bottom: -2px;
        width: 20.933vw;
        height: 1vw;
        border-radius: 10.4vw;
        background-color: #4A90E2;
      }*/
    }
  }
  .code-container{
    height:calc(100% - 324px);
    border-top:1px solid #ECECEC;
  }
  .code-content{
    height:100%;
    h2{
      padding:12px 0;
      text-align:center;
      color: #838899;
      font-size:28px;
    }
  }
  /*.title{
    padding:12px 19px 12px 22px;
    display:flex;
    justify-content:space-between;
    align-items:center;!*垂直居中*!
    strong{
      font-size:18px;
      color:#666;
      font-weight:500;
    }
    span{
      font-size:24px;
      color:#F5A623;
    }
  }*/
  .info-area{
    padding:0 17px 17px;
    border-bottom:1px solid #979797;
    p{
      margin-top:10px;
      color:#585858;
      font-size:12px;
    }
  }
  .middle-gap{
    display:flex;
    .cube-input{
      background-color:#EEE;
    }
    .cube-input-field{
      color:#515151;
    }
    .cube-btn{
      background:#4A90E2;
    }
  }
  .exchange-info{
    padding:12px 17px 20px;
    h3{
      margin:4px 0 15px;
      font-size:16px;
      color:#999;
    }
    .exchange-wrapper{
      display:flex;
      color:#4A90E2;
      .exchange-content{
        /*flex:1;*/
        width:23.86%;
        text-align:center;
        border:1px solid #4A90E2;
        margin-right:1.5%;
        h2{
          margin:10px 0;
          font-size:20px;
          font-weight:500;
        }
        p{
          font-size:14px;
          margin-bottom:10px;
          white-space:nowrap;
        }
      }
      .exchange-content:last-child{
        margin-right:0;
      }
      .adjust-width{
        /*width:49.18%;*/
        width:32.18%;
      }
    }
  }
  .super-code{
    width:80%;
    margin:15px auto 0;
    border-radius:15px;
    height:30px;
    line-height:30px;
    text-align:center;
    color:#fff;
    font-size:16px;
    background:#4A9CFE;
    span{
      white-space:nowrap;
    }
  }
  .add-border-top{
    border-top:1px solid #eaeaea;
    border-bottom:1px solid #eaeaea;
  }

  .add-border{border-radius:5px;}

  .enable-button{background:#4A9CFE;color:#fff;}

  .add-weight{
    font-weight:bold;
    color:#333;
    font-size:25px;
  }
  .use-notice{
    display:flex;
    align-items:center;
    padding:0 30px;
    height:66px;
    line-height:66px;
    .line{
      flex:0.25;
      height:1px;
      background:#EAEAEA;
    }
    .warm-text{
      flex:1;
      font-size:24px;
      text-align:center;
      color:#838899;
      span{
        color:#FF3636;
      }
    }
  }
  .use-info{
    height:88px;
    line-height:88px;
    font-size:0;
    background:#fff;
  }
  .use-info-title{
    /*margin:10px 0 15px;*/
    text-align:center;
    .use-btn-group{
      width:100%;
      /*margin:0 auto;*/
      /*border:1px solid #4A90E2;*/
      /*border-radius:7px;*/
    }
    span{
      display:inline-block;
      width:24.99999%;
      font-size:26px;
      text-align:center;
      color:#838899;
    }
    .selected{
      position:relative;
      color:#202C5B;
      font-weight:600;
      &:after{
        content: "";
        position: absolute;
        transform: translateX(-50%);
        left: 50%;
        bottom: -2px;
        width: 24.99999vw;
        height: 0.68vw;
        border-radius: 10.4vw;
        background-color: #040440;
      }
    }
  }




  .scroll-list-wrap{
    /*height:calc(100% - 324px);*/
    height:100%;
    background:#fff;
  }

  .code-item{
    display:flex;
    height:104px;
    line-height:104px;
    padding-left:30px;
    align-items:center;
    .avatar{
      img{
        width:45px;
        height:45px;
        vertical-align: middle;
      }
    }
    .detail{
      flex:1;
      h3{
        display:flex;
        padding-right:30px;
        border-bottom:1px solid #ECECEC;
        span{
          flex:1;
          text-align:center;
        }
        span:first-child{
          flex:0.85;
          font-weight:600;
          font-size:30px;
          color:#202C5B;
        }
        span:nth-child(2){
          flex:0.8;
          font-size:26px;
        }
        span:nth-child(3){
          flex:1.3;
          font-size:22px;
          color:#838899;
        }
        .unused{
          color:#00A989;
        }
        .used{
          color:#DC0630;
        }
        button{
          flex:0.7;
          height:54px;
          line-height:54px;
          margin-top:25px;
          font-size:24px;
          color:#173E8F;
          border:1px solid rgba(23,62,143,1);
          border-radius:27px;
          background:none;
        }
      }
    }

  }
  /*.code-item:nth-child(even){
    background:rgba(248,248,248,1);
  }
  .code-item:nth-child(odd){
    background:rgba(240,240,240,1);
  }*/




  .active-ct {
    .upgrade-member {

      margin: 0 auto 35px;
      width: 634px;
      /*height: 481px;*/
      /*height: 380px;*/
      -webkit-overflow-scrolling: touch;
      overflow: auto;
      background:#fff;
      border-radius:14px;
      h2{
        margin:92px auto 36px;
        font-size:32px;
        text-align:center;
        color:#00A989;
      }
      h3{
        margin:0 auto 80px;
        text-align:center;
        font-size:32px;
        line-height:1.5;
        color:#202C5B;
      }
      h4{
        font-size:13px;
        text-align:center;
      }
      .submit-btn{
        height:108px;
        line-height:108px;
        width:100%;
        font-size:0;
        margin:15px auto 0;
        border-top:1px solid #D0D4E4;
        text-align:center;
        span{
          display:inline-block;
          width:49.99999%;
          border-radius:5px;
          font-size:30px;
          color:#202C5B;
        }
        span:last-child{
          color:#1253FC;
          border-left:1px solid #D0D4E4;
          /*margin-right:10px;*/
        }
      }
    }
  }
  .application-wrapper{
    display:flex;
    height:98px;
    /*line-height:98px;*/
    align-items:center;
    .bottom-content{
      display:flex;
      align-items:center;
      width:100%;
      height:98px;
      /*line-height:98px;*/
      font-size:36px;
      text-align:center;
      color:#2E3045;
      background:rgba(255,255,255,1);
      box-shadow:0px -1px 8px 0px rgba(10,29,87,0.2);
      p{
        font-size:30px;
        color:#202C5B;
        cursor:pointer;
        img{
          width:34px;
          height:34px;
          margin:0 20px 0 30px;
          vertical-align: middle;
        }
      }
      .choose-info{
        flex:1;
        text-align:right;
        h3{
          font-size:26px;
          color:#173E8F;
        }
        h4{
          margin-top:13px;
          font-size:24px;
          color:#838899;
        }
      }
      h5{
        width:176px;
        height:64px;
        margin:17px 30px;
        line-height:64px;
        background:#D0D0D0;
        border-radius:32px;
        font-size:28px;
        color:#FFF;
        cursor:pointer;
      }
      .selected{
        background:rgba(23,62,143,1);
      }
    }
  }

  .mask{
    position:fixed;
    z-index:9991;
    height:100%;
    width:100%;
    top:0;
    bottom:0;
    left:0;
    right:0;
    background:rgba(0, 0, 0, 0.5);

    .general-height{
      /*height: 500px;*/
      height: 67.46vh;
      background:rgba(255,255,255,1);
    }
    .title{
      padding:29px 0 28px;
      font-size:34px;
      border-bottom:1px solid rgba(245,245,245,1);
      color:#202C5B;
      text-align:center;
    }
    .number-group{
      position:absolute;
      z-index:9992;
      bottom:0;
      left:0;
      right:0;
      height:448px;
      >div:first-child{
        border-top:1px solid rgba(245,245,245,1);
      }
      .number-btn{
        display:flex;
        div{
          flex:1;
          height:111px;
          line-height:111px;
          font-size:50px;
          color:#333;
          text-align:center;
          border-bottom:1px solid rgba(245,245,245,1);
          border-right:1px solid rgba(245,245,245,1);
          -webkit-tap-highlight-color:rgba(0,0,0,0.15);
        }
        div:active{
          background:rgba(0,0,0,0.15);
        }
        div:last-child{
          border-right:none;
        }
        .no-num{
          background:#e3e7ee;
          img{
            width:44px;
            height:32px;
            display:block;
            margin:40px auto;
          }
        }
      }
    }
    .shopping-detail{
      position:fixed;
      width:100%;
      bottom:0;
      left:0;
      right:0;

      .content{
        margin:97px 30px 0;
        h2{
          margin-bottom:66px;
          text-align:center;
          font-size:30px;
          color:#202C5B;
          font-weight:600;
          span{
            font-size:72px;
          }
        }
        p{
          display:flex;
          justify-content:space-between;
          margin-top:30px;
          font-size:28px;
          padding-bottom:29px;
          border-bottom:1px solid #ececec;
          span{
            color:#71768C;
          }
          strong{
            color:#202C5B;
          }
        }
        /*p:last-child{
          margin-top:30px;
        }*/
        .wechat{
          input{
            display:block;
            width:100%;
            height:84px;
            line-height:84px;
            border:1px solid rgba(227,227,227,1);
            border-radius:8px;
            text-indent:22px;
            font-size:26px;
            box-shadow:0 0 0 rgba(0,0,0,0);
            -webkit-appearance:none;
            outline:none;
            background:#F6F7F8;
          }
        }
      }
      .result{
        margin-top:97px;
        text-align:center;
        img{
          width:80px;
          height:80px;
          margin-bottom:41px;
        }
        h3{
          margin-bottom:60px;
          font-size:28px;
          color:#202C5B;
        }
        p{
          font-size:28px;
          color:#71768C;
        }
      }
      .pay-btn{
        position:absolute;
        bottom:30px;
        height:84px;
        line-height:84px;
        text-align:center;
        background:rgba(23,62,143,1);
        border-radius:8px;
        color:#fff;
        width:calc(100% - 60px);
        margin:0 30px;
        font-size:34px;
      }
    }
    .pay-password{
      position:fixed;
      width:100%;
      bottom:0;
      left:0;
      right:0;
      .password-wrapper{
        display:flex;
        margin:43px 30px 0;
        height:88px;
        line-height:88px;
        border:1px solid rgba(209,209,209,1);
        border-radius:10px;
        span{
          flex:1;
          text-align:center;
          border-right:1px solid rgba(209,209,209,1);
          strong{
            display:block;
            width:20px;
            height:20px;
            border-radius:50%;
            background:#333;
            margin:34px auto;
          }
        }
        span:last-child{
          border-right:none;
        }
      }
      .forget-password{
        color:#1253FC;
        width:25%;
        padding:12px 0;
        margin:12px auto 0;
        text-align:center;
        font-size:28px;
      }
      .pay-loading{
        position:absolute;
        z-index:9993;
        bottom:0;
        left:0;
        right:0;
        height:calc(100% - 70px);
        background:#fff;
        .paying{
          position:absolute;
          left:50%;
          top:50%;
          transform:translate(-50%, -50%);
          text-align:center;
          font-size:30px;
          color:#4B74E8;
          img{
            display:block;
            width:40px;
            height:40px;
            margin:0 auto 15px;
          }
        }
      }

    }
    .id-check{
      position:fixed;
      width:100%;
      bottom:0;
      left:0;
      right:0;
      .check-title{
        position:relative;
        img{
          position:absolute;
          left:30px;
          top:29px;
          width:34px;
          height:34px;
        }
      }
      .check-content{
        margin-top:32px;
        padding:0 30px;
        p{
          text-align:center;
          color:#202C5B;
          font-size:26px;
          line-height:1.5;
        }
        .sms-input{
          height:84px;
          line-height:84px;
          margin-top:28px;
          input{
            display:inline-block;
            height:84px;
            line-height:84px;
            width:59.9999%;
            text-indent:22px;
            font-size:30px;
            border-radius:10px 0 0 10px;
            border:1px solid rgba(227,227,227,1);
            border-right:none;
            box-shadow:0 0 0 rgba(0,0,0,0);
            -webkit-appearance:none;
            outline:none;
            background:#F6F7F8;
          }
          span{
            display:inline-block;
            width:39.9999%;
            height:84px;
            line-height:84px;
            border-radius:0 10px 10px 0;
            vertical-align:top;
            background:#D1D1D1;
            color:#fff;
            font-size:30px;
            text-align:center;
            /*border:1px solid rgba(227,227,227,1);
            border-left:none;*/
          }
        }
        .finish-btn{
          height:84px;
          line-height:84px;
          margin-top:32px;
          text-align:center;
          color:#fff;
          font-size:34px;
          border-radius:8px;
          background:rgba(23,62,143,0.5);
        }
        .success{
          background:rgba(23,62,143,1);
        }
      }
    }
  }
  .fixed-position{
    position:fixed;
  }
  .static-position{
    position:absolute;
  }

  .fade-enter-active, .fade-leave-active{
    /*opacity:1;
    background: rgba(7, 17, 27, 0.8);*/
    transition: all 0.5s;
    transform:translate(0, 0);
  }
  .fade-enter, .fade-leave-active{
    /*opacity:0;
    background:rgba(7, 17, 27, 0);*/
    transform: translate(0, 100%);
  }



  .cube-popup_mask{
    background:rgba(0,0,0,0.5);
  }
  .cube-input-field:focus{
    outline:none;
  }
  .cube-input:after{
    border:none;
  }

</style>
<style>
  .cube-toast-tip{
    /*max-width:13em;*/
    font-size:28px;
    max-width:15.5em;
    line-height:40px;
  }
  .cube-toast.cube-popup {
    z-index: 10000!important;
  }
  .cube-popup, .cube-popup_mask, .cube-my-popup{
    z-index: 10000!important;
  }

</style>
